package com.app;

import android.app.Application;
import android.content.Context;

import com.lidroid.util.AppManager;

import cn.trinea.android.common.util.SDCardUtils;

/**
 * Created by ${oushuhua} on 2017/5/3.
 */

public class MApplication extends Application {

   // public static final String url = "http://10.1.1.200:7777/mockjsdata/5/";
    public static String VERSION_NAME = "";
    public static int VERSION_CODE = 1;
    private static Context mContext;
    @Override
    public void onCreate() {
        super.onCreate();
        mContext = this;
        initAppVersionInfo();
        initAllFuncation();
        SDCardUtils.initAppDir(mContext);
    }

    @Override
    public void onTerminate() {
        AppManager.getAppManager().exitApp();
        super.onTerminate();
    }

    public static Context getContext(){
        return mContext;
    }

    private void initAllFuncation(){
        //SDKInitializer.initialize(this);
    }



    private void initAppVersionInfo(){
        VERSION_NAME = AppUtil.getVersionName(this);
        VERSION_CODE = AppUtil.getVersionCode(this);
    }


}
